import commondUtil from './utils/commondUtil';

App({
  onLaunch() {
    // 未登录则跳转登录界面
    if (commondUtil.isNotBlank(wx.getStorageSync('token'))) {
      wx.switchTab({
        url: '/pages/signClient/signClient'
      });
    } else {
      wx.redirectTo({ url: '/pages/login/login' });
    }
  },
  globalData: {},

  getCurPage() {
    const pages = getCurrentPages();
    if (pages == null || pages.length < 1) {
      return null;
    }
    return pages[pages.length > 1 ? (pages.length - 2) : 0].route
  },
  
})